package com.os.meituan.repository;


import com.os.meituan.model.pomodel.T_SYS_Role_To_User;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by Administrator on 2017/6/14.
 */
public interface SYS_Role_To_UserRepository extends PagingAndSortingRepository<T_SYS_Role_To_User, String>, JpaSpecificationExecutor<T_SYS_Role_To_User> {

    @Query("select t.roleId from T_SYS_Role_To_User t where t.userId=:userId")
    List<String> findUserRoleIds(@Param("userId") String userId);

}
